Make addLocalRpaths an enum to support different build configurations#10053
Open
rbenegal wants to merge 3 commits into
Open
Make addLocalRpaths an enum to support different build configurations#10053rbenegal wants to merge 3 commits into
rbenegal wants to merge 3 commits into
Conversation
rpaths should only be used in the debug configuration to assist with debugging. In the release configuration these can cause linker warnings and issues with location, relocation, performance and security.
owenv
requested changes
May 13, 2026
Contributor
|
@swift-ci test |
Allow for PIFBuilder to be called with addLocalRpathsInReleaseConfiguration=false so that rpaths can be turned off only for the release configuration but kept on for debug configurations.
owenv
reviewed
May 15, 2026
addLocalRpaths can now be set to one of: .never, .debugOnly or .always to allow for selectively adding rpaths based on build requirements.
Author
|
@swift-ci test |
owenv
approved these changes
May 15, 2026
bkhouri
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow for
addLocalRpathsto be called with one of:.never, .debugOnlyor.alwaysto allow for selectively adding rpaths based on build requirements.Motivation:
In the release configuration adding local rpaths can cause linker warnings and issues with location, relocation, performance and security. Instead of always adding rpaths, the
.debugOnlyoption can be used to ensure that release configs do not get an rpath.Modifications:
addLocalRpathswas converted to an enum to allow for.never, .debugOnlyor.alwaysoptions. Tests and comments were updated accordingly.Result:
Users of PIFBuilder can now turn off rpaths for the release configuration but keep rpaths on for debug configurations to assist with debugging. The previous functionality of turning off rpaths completely is still available with the
.neveroption.Related: rdar://173020084